﻿using AntdUI;

namespace WenAntdUI.Helps;

public static class CanvasHelp
{
    public static void DrawBorderRound(this Canvas canvas, Control control, float lineWidth = 1, int round = 6)
    {
        var rect = control.ClientRectangle.PaddingRect(control.Padding);
        var radius = round * Config.Dpi;
        var path = rect.RoundPath(radius);
        using var pen = new Pen(Color.FromArgb(236, 236, 236), lineWidth);
        canvas.Draw(pen, path);
    }
}
